﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using EnvironmentManagerSystem.BLL;
using EnvironmentManagerSystem.MODE;
using EnvironmentManagerSystem.Utility;
using AjaxPro;
using System.Data.SqlClient;

namespace EnvironmentManagerSystem.HuanTong
{
    public partial class HTUserDiTu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (StfInfo.ReSession()) return; if (!IsPostBack)
                {
                    if (Session["a"] != null)
                    {
                        DevelopprojectbasicinfoDataCollection lst = BLL.NoticeService.GetByIDs(Session["a"].ToString());
                        foreach (DevelopprojectbasicinfoData item in lst)
                        {
                            if (item.jingdu == "" || item.weidu == "" || item.jingdu == null || item.weidu == null)
                            {
                            }
                            else
                            {
                                if (item.jingdu.Contains('\''))
                                {
                                    string jingdu = item.jingdu.Insert(item.jingdu.IndexOf('\''), "\\");
                                    jingdu = jingdu.Insert(jingdu.IndexOf('\"'), "\\");
                                    lblGBSE.Text += jingdu + ",";
                                }
                                else
                                    lblGBSE.Text += item.jingdu + ",";
                                if (item.weidu.Contains('\''))
                                {
                                    string weidu = item.weidu.Insert(item.weidu.IndexOf('\''), "\\");
                                    weidu = weidu.Insert(weidu.IndexOf('\"'), "\\");
                                    lblGBSN.Text += weidu + ",";
                                }
                                else
                                    lblGBSN.Text += item.weidu + ",";

                                lblGPSE.Text += OfficeHelper.GPSTrans(item.jingdu) + ",";
                                lblGPSN.Text += OfficeHelper.GPSTrans(item.weidu) + ",";
                                lblProjectName.Text += item.ProjectName + ",";
                                lblAClassName.Text += item.AClassName + ",";
                                lblAddress.Text += item.address + ",";
                                labhplb.Text += item.huanpingleibieName + ",";
                                labInvestment.Text += item.Investment + ",";
                                labEIAIndustryType.Text += item.EIAIndustryType + ",";
                            }
                        }
                        lblProjectName.Text = lblProjectName.Text.Trim(',');
                        lblGBSN.Text = lblGBSN.Text.Trim(',');
                        lblGBSE.Text = lblGBSE.Text.Trim(',');
                        lblGPSN.Text = lblGPSN.Text.Trim(',');
                        lblGPSE.Text = lblGPSE.Text.Trim(',');
                        lblAddress.Text = lblAddress.Text.Trim(',');
                        lblAClassName.Text = lblAClassName.Text.Trim(',');
                        labhplb.Text = labhplb.Text.Trim(',');
                        labInvestment.Text = labInvestment.Text.Trim(',');
                        labEIAIndustryType.Text = labEIAIndustryType.Text.Trim(',');
                    }
                    else
                    {
                        UpdatePanel1.Visible = false;
                        id.Text = "请选择要查看地图的项目";
                    }
                }
            }
            catch
            { }
        }
    }
}